//
//  BaseViewController.h
//  SystemLocationDemo
//
//  Created by company_2 on 2017/8/28.
//  Copyright © 2017年 余东洋. All rights reserved.
//

#import <UIKit/UIKit.h>
@interface AddressModel : NSObject
@end

typedef NS_ENUM(NSInteger,LocStatus){
    LocStatusForAllLocSuccess,
    LocStatusForNotTurnOnSetting,
    LocStatusForLocFaild,
    LocStatusForGeoCoderError
};


/**
 *  定位的相关设置：
 *  //1、添加库 CoreLocation.framework
 *  //2、在info.plist文件里添加 这两个描述 获得用户的允许权限
 *  //Privacy - Location When In Use Usage Description -> 是否允许此App在使用期间访问你的位置?
 *  //Privacy - Location Always Usage Description -> 是否允许此App永久访问你的位置?
 */
@class AddressModel;

typedef void(^AlertMessageSubmitBlock)();
typedef void(^AlertMessageCancelBlock)();
typedef void(^LocationBlock)(AddressModel * addressModel,LocStatus locStatus);

@interface BaseViewController : UIViewController

/** 开始定位的方法 */
- (void)StartLocactionWithBlock:(LocationBlock)locationBlock;

/** 系统弹出框 */
-(void)alertBytitle:(NSString *)title message:(NSString *)message submitBlock:(AlertMessageSubmitBlock)submitBlock cancelBlock:(AlertMessageCancelBlock)cancelBlock;

@end
